//
//  YZQSecondMoneyCell.m
//  A_project2.0
//
//  Created by apple on 16/3/15.
//  Copyright © 2016年 七平. All rights reserved.
//

#import "YZQSecondMoneyCell.h"
#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height
@implementation YZQSecondMoneyCell
- (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self  = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.img = [[UIImageView alloc] init];
        [self.contentView addSubview:_img];
        
        self.titleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_titleLabel];
        
        self.priceLabel = [[UILabel alloc] init];
        _priceLabel.textColor = [UIColor redColor];
        _priceLabel.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:_priceLabel];
        
        self.priceoffLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_priceoffLabel];
        
        
    }
    
    return self;
    
}

- (void)layoutSubviews
{
    
    [super layoutSubviews];
    _img.frame = CGRectMake(10, 5, WIDTH / 3 - 27, 80);
    _titleLabel.frame = CGRectMake(WIDTH / 3 , 10, WIDTH / 2 + 50 , 40);
    _priceoffLabel.frame = CGRectMake(WIDTH / 3 , 55, 50, 30);
    _priceLabel.frame = CGRectMake(self.contentView.frame.size.width - 140, 55, 130, 30);
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
